from flask import Blueprint,render_template,request

user = Blueprint("user",__name__)

@user.route("/reg",methods=["GET","POST"])
def reg():
    if request.method == "GET":
        return render_template("reg.html")
    else:
        username = request.form.get("username")
        password = request.form.get("password")
        print(username,password)
        return {"msg":"添加成功"}

@user.route("/login")
def login():
    pass